
import java.util.*;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2022/11/15 14:04
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int size = scanner.nextInt();
        int[] array = new int[size];

        for (int i = 0; i < array.length; i++) {
            array[i] = scanner.nextInt();
        }
        quickSort(array);

        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }
    public static void swap ( int[] array, int i, int j) {
        int t = array[i];
        array[i] = array[j];
        array[j] = t;
    }
    //快速
    public static void quickSort(int[] array) {
        quickSortInternal(array, 0, array.length - 1);  // 左闭右闭区间
    }

    private static void quickSortInternal(int[] array, int from, int to) {
        if (to - from + 1 <= 1) {
            return;
        }
        int i = partition(array, from, to);
        quickSortInternal(array, from, i - 1);
        quickSortInternal(array, i + 1, to);
    }
    private static int partition(int[] array, int from, int to) {
        int pivot = array[to];
        int left = from;
        int right = to;
        while (left<right){
            while (left<right && array[left]<=pivot){
                left++;
            }

            array[right] = array[left];

            while (left<right && array[right]>= pivot){
                right--;
            }

            array[left] = array[right];
        }
        array[left] = pivot;
        return left;
    }
}

